function VMOMist()
	if not IsAddOnLoaded("PQInterface") then
		if not VSIWarning then
			VAS_WriteToChat("\124cFFFF55FFWarning: only works with VSI addon!")
			VSIWarning = true
		end
		return true
	end

	if not PQI_General_Mist_Monk_GUI_Loaded then
		local config = {
			name	= 'General Mist Monk',
			author	= 'Vachiusa',
			abilities = {
				-- General --
				{	name = "Auto Open PQI Options",
					tooltip = "Auto Opens PQI Options for you, will only happen once per login.",
					enable = true,
				},
				{	name = "54 Events",
					tooltip = "Enables the use of 5.4 boss specific mechanics",
					enable = true,
				},				
				{	name = "53 Events",
					tooltip = "Enables the use of 5.3 boss specific mechanics",
					enable = false,
				},
				{ 	name = "4x Events",
					enable = false,
					tooltip = "Enables the use of 4.x boss specific mechanics",
				},
				{ 	name = "Special Events",
					enable = false,
					tooltip = "Enables the use of special events mechanics (Providing Ground...)",
				},	
				{ 	name = "Auto Event Dispel",
					enable = true,
					tooltip = "Enables the use of dispel on special events mechanics",
				},								
				{ 	name = "Queue Sys",
					enable = true,
					tooltip = "Enables the use of auto dispel for Queue System",
				},					
				{ 	name = "Auto Target",
					enable = true,
					tooltip = "If you dont have a target it will target your focus target",
				},
				{ 	name = "Low Mana",	
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 20,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of Mana to not use some high mana skills at",
					},
				},
				{ 	name = "DPS",
					enable = true,
					tooltip = "Enables DPS",
					widget = { type = 'numBox',
						value = 0,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of minimum raid members HP to DPS at",
					},
				},
				{ 	name = "Detox",
					enable = true,
					tooltip = "Enables the use of Detox",
					widget = { type = 'numBox',
						value = 50,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Detox at",
					},
				},
				{ 	name = "Spam Expel Harm",
					enable = false,
					tooltip = "Will use Expel Harm on CD",
				},
				{ 	name = "Spam Renewing Mist",
					enable = true,
					tooltip = "Will use Renewing Mist on CD",
				},				
				{ 	name = "Racials",
					enable = true,
					tooltip = "Enables the use of Racials",
				},								
				{ 	name = "Target Heal",
					enable = false,
					tooltip = "Enables the use of Target Heal priority",
				},											
				{ 	name = "Mouseover Heal",
					enable = false,
					tooltip = "Enables the use of Mouseover Heal priority",
				},		
				{ 	name = "NPC Mouseover Heal",
					enable = false,
					tooltip = "Enables the use of NPC Mouseover Heal priority",
				},			
				{ 	name = "Pet Heal",
					enable = true,
					tooltip = "Enables the use of Pet Heal",
				},			
				{ 	name = "V debug",
					enable = false,
					tooltip = "Enables the use of Vachiusa debug",
				},				
			},
			hotkeys = {
			},
		}
		PQI_General_Mist_Monk_GUI_Loaded = PQI:AddRotation(config)
	end

	if not PQI_CD_Mist_Monk_GUI_Loaded then
		local config = {
			name	= 'CD Mist Monk',
			author	= 'Vachiusa',
			abilities = {									
				-- CD's --
				{ 	name = "Life Cocoon",
					enable = true,
					tooltip = "Enables the use of Life Cocoon",
					widget = { type = 'numBox',
						value = 20,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Life Cocoon at",
					},
				},
				{ 	name = "Chi Burst",
					enable = false,
					tooltip = "NO USE - Enables the use of Chi Burst",
					widget = { type = 'numBox',
						value = 85,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Cascade at",
					},
				},
				{ 	name = "Chi Burst Limit",
					enable = false,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 4,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Chi Burst at",
					},
				},
				{ 	name = "VSpinning CKick",
					enable = false,
					tooltip = "Enables the auto use of Spinning CKick",
					widget = { type = 'numBox',
						value = 70,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Spinning CKick at",
					},
				},
				{ 	name = "VSpinning CKick Limit",
					enable = false,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 3,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Spinning CKick at",
					},
				},	
				{ 	name = "Rushing Jade Wind",
					enable = true,
					tooltip = "Enables the auto use of Rushing Jade Wind",
					widget = { type = 'numBox',
						value = 80,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Rushing Jade Wind at",
					},
				},
				{ 	name = "Rushing Jade Wind Limit",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 3,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Rushing Jade Wind at",
					},
				},							
				{ 	name = "Revival",
					enable = true,
					tooltip = "Enables the use of Revival",
					widget = { type = 'numBox',
						value = 60,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Revival at",
					},
				},	
				{ 	name = "Revival Limit",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 4,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Revival at",
					},
				},	
				{ 	name = "Chi Wave",
					enable = true,
					tooltip = "Enables the use of Chi Wave",
					widget = { type = 'numBox',
						value = 85,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Chi Wave at",
					},
				},	
				{ 	name = "Chi Wave Limit",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 2,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Chi Wave at",
					},
				},	
				{ 	name = "Zen Sphere",
					enable = true,
					tooltip = "Enables the use of Zen Sphere",
					widget = { type = 'numBox',
						value = 100,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Zen Sphere at",
					},
				},	
				{ 	name = "Zen Sphere Limit",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 1,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of raid members around healing target to use Zen Sphere at",
					},
				},		
			},
			hotkeys = {
			},
		}
		PQI_CD_Mist_Monk_GUI_Loaded = PQI:AddRotation(config)
	end

	if not PQI_Healing_Mist_Monk_GUI_Loaded then
		local config = {
			name	= 'Healing Mist Monk',
			author	= 'Vachiusa',
			abilities = {																	
				-- Healing --
				{ 	name = "Enveloping Mist",
					enable = true,
					tooltip = "Enables the use of Enveloping Mist",
					widget = { type = 'numBox',
						value = 60,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Enveloping Mist at",
					},
				},
				{ 	name = "Mana Tea",
					enable = true,
					tooltip = "Enables the use of Mana Tea",
					widget = { type = 'numBox',
						value = 90,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of Mana to use Mana Tea at",
					},
				},
				{ 	name = "Mana Tea Limit",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 5,
						step = 1,
						max = 20,
						min = 0,
						tooltip = "The number of stacks to use Mana Tea at",
					},
				},	
				{ 	name = "Renewing Mist",
					enable = true,
					tooltip = "Enables the use of Renewing Mist",
					widget = { type = 'numBox',
						value = 95,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Renewing Mist at",
					},
				},	
				{ 	name = "Renewing Mist Tank",
					enable = true,
					tooltip = "Enables the use of Renewing Mist on Tanks",
					widget = { type = 'numBox',
						value = 99,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Renewing Mist on Tanks at",
					},
				},	
				{ 	name = "Soothing Mist",
					enable = true,
					tooltip = "Enables the use of Soothing Mist",
					widget = { type = 'numBox',
						value = 71,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Soothing Mist at",
					},
				},	
				{ 	name = "Soothing Mist 4 Chi",
					enable = true,
					tooltip = "Enables the use of Soothing Mist 4 gen Chi",
					widget = { type = 'numBox',
						value = 95,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Soothing Mist 4 gen Chi at",
					},
				},	
				{ 	name = "Surging Mist Instant",
					enable = true,
					tooltip = "Enables the use of Surging Mist Instant",
					widget = { type = 'numBox',
						value = 70,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Surging Mist Instant at",
					},
				},	
				{ 	name = "Surging Mist",
					enable = true,
					tooltip = "Enables the use of Surging Mist",
					widget = { type = 'numBox',
						value = 20,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Surging Mist at",
					},
				},	
				{ 	name = "TFTea Surging Mist",
					enable = true,
					tooltip = "Enables the use of TFTea + Surging Mist",
					widget = { type = 'numBox',
						value = 15,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use TFTea + Surging Mist at",
					},
				},	
				{ 	name = "Uplift",
					enable = true,
					tooltip = "Enables the use of Uplift",
					widget = { type = 'numBox',
						value = 90,
						step = 1,
						max = 100,
						min = 0,
						tooltip = "The percent of HP to use Uplift at",
					},
				},	
				{ 	name = "Uplift Count",
					enable = true,
					tooltip = "Not work",
					widget = { type = 'numBox',
						value = 3,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The number of ReMs to use Uplift at",
					},
				},				
				{ 	name = "TFTea Uplift",
					enable = true,
					tooltip = "Enables the use of TFTea + Uplift",
					widget = { type = 'numBox',
						value = 4,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The percent of HP to use TFTea + Uplift at",
					},
				},		
				{ 	name = "TFT ReM",
					enable = true,
					tooltip = "Enables the use of TFT + ReM",
					widget = { type = 'numBox',
						value = 6,
						step = 1,
						max = 10,
						min = 0,
						tooltip = "The percent of HP to use TFT + ReM at",
					},
				},										
			},
			hotkeys = {
				{	name = "Pause Rotation",		enable = true,	hotkeys = {'ls'},	},
				{	name = "Crackling Jade Lightning",			enable = true,	hotkeys = {'rs'},	
					tooltip = "Crackling Jade Lightning", },
				{	name = "Lightning Weaver",			enable = false,	hotkeys = {'rs'},	
					tooltip = "Use Lightning Weaver mod switch", },					
				{	name = "Jade Serpent Statue",		enable = true,	hotkeys = {'lc'},
					tooltip = "Use Jade Serpent Statue at mouseover", },
				{	name = "Healing Sphere",			enable = true,	hotkeys = {'ra'},	
					tooltip = "Use Healing Sphere at mouseover", },
				{	name = "Spinning Crane Kick",		enable = true,	hotkeys = {'rc'},	
					tooltip = "Spinning Crane Kick", },	
				{	name = "Chi Burst",				enable = true,	hotkeys = {'ls','rs'},	
					tooltip = "Pop Chi Burst", },						
				{	name = "Zen Meditation",		enable = true,	hotkeys = {'ls','ra'},	
					tooltip = "Pop Zen Meditation", },						
				{	name	= "Adding Players CT",		enable	= true,	hotkeys	= {'ls', 'la'},
					tooltip = "Adding Players to Custom Table", },	
				{	name	= "Removing Players CT",		enable	= true,	hotkeys	= {'ls', 'lc'},
					tooltip = "Removing Players from Custom Table", },						
			},
		}
		PQI_Healing_Mist_Monk_GUI_Loaded = PQI:AddRotation(config)
	end
	if VaSpec ~= 270 then
		VaSpec = 270
		PQR_RotationChanged("Vachiusa Mist Monk")
	end

	if PQI_General_Mist_Monk_GUI_Loaded and PQI_CD_Mist_Monk_GUI_Loaded and PQI_Healing_Mist_Monk_GUI_Loaded then
		PQI_Variables_Loaded = PQI_VachiusaGeneralMistMonk_AutoOpenPQIOptions_enable
		VachiusaMistMonk_AutoOpenPQIOptions_enable = PQI_VachiusaGeneralMistMonk_AutoOpenPQIOptions_enable

		Vasa_EnvelopingMistCheck = PQI_VachiusaHealingMistMonk_EnvelopingMist_enable
		Vasa_EnvelopingMist = PQI_VachiusaHealingMistMonk_EnvelopingMist_value
		Vasa_ManaTeaCheck = PQI_VachiusaHealingMistMonk_ManaTea_enable
		Vasa_ManaTea = PQI_VachiusaHealingMistMonk_ManaTea_value
		Vasa_ManaTeaLimitCheck = PQI_VachiusaHealingMistMonk_ManaTeaLimit_enable
		Vasa_ManaTeaLimit = PQI_VachiusaHealingMistMonk_ManaTeaLimit_value		
		Vasa_RenewingMistCheck = PQI_VachiusaHealingMistMonk_RenewingMist_enable
		Vasa_RenewingMist = PQI_VachiusaHealingMistMonk_RenewingMist_value
		Vasa_RenewingMistTankCheck = PQI_VachiusaHealingMistMonk_RenewingMistTank_enable
		Vasa_RenewingMistTank = PQI_VachiusaHealingMistMonk_RenewingMistTank_value
		Vasa_SoothingMistCheck = PQI_VachiusaHealingMistMonk_SoothingMist_enable
		Vasa_SoothingMist = PQI_VachiusaHealingMistMonk_SoothingMist_value
		Vasa_SoothingMist4ChiCheck = PQI_VachiusaHealingMistMonk_SoothingMist4Chi_enable
		Vasa_SoothingMist4Chi = PQI_VachiusaHealingMistMonk_SoothingMist4Chi_value
		Vasa_SurgingMistInstantCheck = PQI_VachiusaHealingMistMonk_SurgingMistInstant_enable
		Vasa_SurgingMistInstant = PQI_VachiusaHealingMistMonk_SurgingMistInstant_value
		Vasa_SurgingMistCheck = PQI_VachiusaHealingMistMonk_SurgingMist_enable
		Vasa_SurgingMist = PQI_VachiusaHealingMistMonk_SurgingMist_value
		Vasa_TFTeaSurgingMistCheck = PQI_VachiusaHealingMistMonk_TFTeaSurgingMist_enable
		Vasa_TFTeaSurgingMist = PQI_VachiusaHealingMistMonk_TFTeaSurgingMist_value
		Vasa_UpliftCheck = PQI_VachiusaHealingMistMonk_Uplift_enable
		Vasa_Uplift = PQI_VachiusaHealingMistMonk_Uplift_value
		Vasa_UpliftCountCheck = PQI_VachiusaHealingMistMonk_UpliftCount_enable
		Vasa_UpliftCount = PQI_VachiusaHealingMistMonk_UpliftCount_value	
		Vasa_TFTeaUpliftCheck = PQI_VachiusaHealingMistMonk_TFTeaUplift_enable
		Vasa_TFTeaUplift = PQI_VachiusaHealingMistMonk_TFTeaUplift_value
		Vasa_TFTReMCheck = PQI_VachiusaHealingMistMonk_TFTReM_enable
		Vasa_TFTReM = PQI_VachiusaHealingMistMonk_TFTReM_value
		
		Vasa_LifeCocoonCheck = PQI_VachiusaCDMistMonk_LifeCocoon_enable
		Vasa_LifeCocoon = PQI_VachiusaCDMistMonk_LifeCocoon_value
		Vasa_ChiBurstCheck = PQI_VachiusaCDMistMonk_ChiBurst_enable
		Vasa_ChiBurst = PQI_VachiusaCDMistMonk_ChiBurst_value	
		Vasa_ChiBurstLimitCheck = PQI_VachiusaCDMistMonk_ChiBurstLimit_enable
		Vasa_ChiBurstLimit = PQI_VachiusaCDMistMonk_ChiBurstLimit_value
		Vasa_SpinningCKickCheck = PQI_VachiusaCDMistMonk_VSpinningCKick_enable
		Vasa_SpinningCKick = PQI_VachiusaCDMistMonk_VSpinningCKick_value
		Vasa_SpinningCKickLimitCheck = PQI_VachiusaCDMistMonk_VSpinningCKickLimit_enable
		Vasa_SpinningCKickLimit = PQI_VachiusaCDMistMonk_VSpinningCKickLimit_value
		Vasa_RushingJadeWindCheck = PQI_VachiusaCDMistMonk_RushingJadeWind_enable
		Vasa_RushingJadeWind = PQI_VachiusaCDMistMonk_RushingJadeWind_value
		Vasa_RushingJadeWindLimitCheck = PQI_VachiusaCDMistMonk_RushingJadeWindLimit_enable
		Vasa_RushingJadeWindLimit = PQI_VachiusaCDMistMonk_RushingJadeWindLimit_value		
		Vasa_RevivalCheck = PQI_VachiusaCDMistMonk_Revival_enable
		Vasa_Revival = PQI_VachiusaCDMistMonk_Revival_value
		Vasa_RevivalLimitCheck = PQI_VachiusaCDMistMonk_RevivalLimit_enable
		Vasa_RevivalLimit = PQI_VachiusaCDMistMonk_RevivalLimit_value	
		Vasa_ChiWaveCheck = PQI_VachiusaCDMistMonk_ChiWave_enable
		Vasa_ChiWave = PQI_VachiusaCDMistMonk_ChiWave_value
		Vasa_ChiWaveLimitCheck = PQI_VachiusaCDMistMonk_ChiWaveLimit_enable
		Vasa_ChiWaveLimit = PQI_VachiusaCDMistMonk_ChiWaveLimit_value	
		Vasa_ZenSphereCheck = PQI_VachiusaCDMistMonk_ZenSphere_enable
		Vasa_ZenSphere = PQI_VachiusaCDMistMonk_ZenSphere_value
		Vasa_ZenSphereLimitCheck = PQI_VachiusaCDMistMonk_ZenSphereLimit_enable
		Vasa_ZenSphereLimit = PQI_VachiusaCDMistMonk_ZenSphereLimit_value	
			
		Vasa_AutoTargetCheck = PQI_VachiusaGeneralMistMonk_AutoTarget_enable
		Vasa_AutoTarget = PQI_VachiusaGeneralMistMonk_AutoTarget_value
		Vasa_LowManaCheck = PQI_VachiusaGeneralMistMonk_LowMana_enable
		Vasa_LowMana = PQI_VachiusaGeneralMistMonk_LowMana_value
		Vasa_DPSCheck = PQI_VachiusaGeneralMistMonk_DPS_enable
		Vasa_DPS = PQI_VachiusaGeneralMistMonk_DPS_value
		Vasa_DetoxCheck = PQI_VachiusaGeneralMistMonk_Detox_enable
		Vasa_Detox = PQI_VachiusaGeneralMistMonk_Detox_value
		Vasa_SpamExpelHarmCheck = PQI_VachiusaGeneralMistMonk_SpamExpelHarm_enable
		Vasa_SpamExpelHarm = PQI_VachiusaGeneralMistMonk_SpamExpelHarm_value
		Vasa_SpamRenewingMistCheck = PQI_VachiusaGeneralMistMonk_SpamRenewingMist_enable
		Vasa_SpamRenewingMist = PQI_VachiusaGeneralMistMonk_SpamRenewingMist_value	
		Vasa_RacialsCheck = PQI_VachiusaGeneralMistMonk_Racials_enable
		Vasa_Racials = PQI_VachiusaGeneralMistMonk_Racials_value
		Vasa_4xEventsCheck = PQI_VachiusaGeneralMistMonk_4xEvents_enable
		Vasa_4xEvents = PQI_VachiusaGeneralMistMonk_4xEvents_value
		Vasa_53EventsCheck = PQI_VachiusaGeneralMistMonk_53Events_enable
		Vasa_53Events = PQI_VachiusaGeneralMistMonk_53Events_value
		Vasa_54EventsCheck = PQI_VachiusaGeneralMistMonk_54Events_enable
		Vasa_54Events = PQI_VachiusaGeneralMistMonk_54Events_value	
		Vasa_SpecialEvents = PQI_VachiusaGeneralMistMonk_SpecialEvents_enable	
		Vasa_AutoEventDispel = PQI_VachiusaGeneralMistMonk_AutoEventDispel_enable
		Vasa_QueueSysCheck = PQI_VachiusaGeneralMistMonk_QueueSys_enable
		Vasa_QueueSys = PQI_VachiusaGeneralMistMonk_QueueSys_value		
		Vasa_Mouseover = PQI_VachiusaGeneralMistMonk_MouseoverHeal_enable
		Vasa_TargetHeal = PQI_VachiusaGeneralMistMonk_TargetHeal_enable
		Vasa_NPCMouseoverHeal = PQI_VachiusaGeneralMistMonk_NPCMouseoverHeal_enable
		Vasa_PetHeal = PQI_VachiusaGeneralMistMonk_PetHeal_enable
		Vdebug = PQI_VachiusaGeneralMistMonk_Vdebug_enable
		
		if Vasa_LowHP == nil then Vasa_LowHP = 80 end
		if Vasa_ActualHP == nil or Vasa_ActualHP then Vasa_ActualHP = false end
		
		-- Hotkeys
		if not PQI_Hotkeys_Functions_Set then
			function PQI_PauseRotation()
				if PQI_VachiusaHealingMistMonk_PauseRotation_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_PauseRotation_key) then
				return true else return false 
			end	end
			function PQI_CracklingJadeLightning()
				if PQI_VachiusaHealingMistMonk_CracklingJadeLightning_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_CracklingJadeLightning_key) then
				return true else return false
			end	end		
			function PQI_LightningWeaver()
				if PQI_VachiusaHealingMistMonk_LightningWeaver_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_LightningWeaver_key) then
				return true else return false
			end	end				
			function PQI_JadeSerpentStatue()
				if PQI_VachiusaHealingMistMonk_JadeSerpentStatue_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_JadeSerpentStatue_key) then
				return true else return false
			end	end			
			function PQI_HealingSphere()
				if PQI_VachiusaHealingMistMonk_HealingSphere_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_HealingSphere_key) then
				return true else return false
			end	end	
			function PQI_SpinningCraneKick()
				if PQI_VachiusaHealingMistMonk_SpinningCraneKick_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_SpinningCraneKick_key) then
				return true else return false
			end	end		
			function PQI_ZenMeditation()
				if PQI_VachiusaHealingMistMonk_ZenMeditation_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_ZenMeditation_key) then
				return true else return false
			end	end		
			function PQI_ChiBurst()
				if PQI_VachiusaHealingMistMonk_ChiBurst_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_ChiBurst_key) then
				return true else return false
			end	end					
			function PQI_AddingPlayersCT()
				if PQI_VachiusaHealingMistMonk_AddingPlayersCT_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_AddingPlayersCT_key) then
				return true else return false
			end	end	
			function PQI_RemovingPlayersCT()
				if PQI_VachiusaHealingMistMonk_RemovingPlayersCT_enable and PQI:IsHotkeys(PQI_VachiusaHealingMistMonk_RemovingPlayersCT_key) then
				return true else return false
			end	end			
		end	
		
		Vasa_PauseRotationCheck = PQI_VachiusaHealingMistMonk_PauseRotation_enable
		Vasa_CracklingJadeLightningCheck = PQI_VachiusaHealingMistMonk_CracklingJadeLightning_enable
		Vasa_LightningWeaverCheck = PQI_VachiusaHealingMistMonk_LightningWeaver_enable	
		Vasa_JadeSerpentStatueCheck = PQI_VachiusaHealingMistMonk_JadeSerpentStatue_enable
		Vasa_HealingSphereCheck = PQI_VachiusaHealingMistMonk_HealingSphere_enable
		Vasa_SpinningCraneKickCheck = PQI_VachiusaHealingMistMonk_SpinningCraneKick_enable
		Vasa_ZenMeditationCheck = PQI_VachiusaHealingMistMonk_ZenMeditation_enable
		Vasa_ChiBurstModCheck = PQI_VachiusaHealingMistMonk_ChiBurst_enable
		Vasa_AddingPlayersCTCheck = PQI_VachiusaHealingMistMonk_AddingPlayersCT_enable
		Vasa_RemovingPlayersCTCheck = PQI_VachiusaHealingMistMonk_RemovingPlayersCT_enable
		
		VachiusaMistMonk_PauseRotation_key = PQI_PauseRotation()
		VachiusaMistMonk_CracklingJadeLightning_key = PQI_CracklingJadeLightning()
		VachiusaMistMonk_LightningWeaver_key = PQI_LightningWeaver()
		VachiusaMistMonk_JadeSerpentStatue_key = PQI_JadeSerpentStatue()
		VachiusaMistMonk_HealingSphere_key = PQI_HealingSphere()
		VachiusaMistMonk_SpinningCraneKick_key = PQI_SpinningCraneKick()
		VachiusaMistMonk_ZenMeditation_key = PQI_ZenMeditation()
		VachiusaMistMonk_ChiBurst_key = PQI_ChiBurst()
		VachiusaMistMonk_AddingPlayersCT_key = PQI_AddingPlayersCT()
		VachiusaMistMonk_RemovingPlayersCT_key = PQI_RemovingPlayersCT()	

		--Set PQI
		if not PQI_VachiusaMistMonk_Set and VachiusaMistMonk_AutoOpenPQIOptions_enable ~= nil then
			VAS_RunMacroText("/PQI show")
			VAS_RunMacroText("/PQI config show")
			VAS_RunMacroText("/PQI config width 220")
			if not VachiusaMistMonk_AutoOpenPQIOptions_enable then
			VAS_RunMacroText("/PQI config hide") end
			PQI_VachiusaMistMonk_Set = true
		end
	end

	
	if PQI_Variables_Loaded == nil then
		if not VSIWarning2 then
			VAS_WriteToChat("\124cFFFF55FFWarning: something wrong with VSI addon!")
			VSIWarning2 = true
		end
		return true
	end

	if not VAS_RotationStarted then
		if UnitLevel("player") ~= 90 then
			VAS_WriteToChat("\124cFFFF55FFWarning: only takes full effect when we're 90!")	
			return true --added
		end	
		QueueSystem()
		VAS_RotationStarted = true
	end

	if VAS_Moving("player") then
		Vasa_Moving = true
	else
		Vasa_Moving = false
	end

	--------------------------------------
	-- Adding Players to Custom Table
	--------------------------------------
	if Vasa_AddingPlayersCTCheck then
		if VachiusaMistMonk_AddingPlayersCT_key
		and not GetCurrentKeyBoardFocus()
		and UnitExists("mouseover")
		and ( CanHeal("mouseover") 
		or UnitIsUnit("player", "mouseover") ) then  
			for i=1, #Vasa_CustomT do
				if Vasa_CustomT[i].GUID and Vasa_CustomT[i].GUID == UnitGUID("mouseover") then
					return false
				end
			end
			
			table.insert(Vasa_CustomT, { GUID = UnitGUID("mouseover") } )
			
			if not GetCVarBool("Vasa_Recording") then
				VAS_WriteToChat("We just added "..UnitName("mouseover").." to the Custom Healing Table.", "Alert")
			end
			return true
		
		end
	end

	--------------------------------------
	-- Removing Players from Custom Table
	--------------------------------------
	if Vasa_RemovingPlayersCTCheck then
		if VachiusaMistMonk_RemovingPlayersCT_key
		and not GetCurrentKeyBoardFocus() 
		and UnitExists("mouseover")
		and ( CanHeal("mouseover") 
		or UnitIsUnit("player", "mouseover") )then
			for i=1, #Vasa_CustomT do
				if Vasa_CustomT[i].GUID and Vasa_CustomT[i].GUID == UnitGUID("mouseover") then
					if not GetCVarBool("Vasa_Recording") then
						VAS_WriteToChat("We just removed "..UnitName(Vasa_CustomT[i].Unit).." from the Custom Healing Table.", "Alert")
					end
					table.remove(Vasa_CustomT, i)
					return true
				end
			end
		end
	end

	-- Pause --
	if (VachiusaMistMonk_PauseRotation_key and not GetCurrentKeyBoardFocus())
	 or UnitIsDeadOrGhost("player") 
	 or (UnitChannelInfo("player") == GetSpellInfo(115176)) --Zen Meditation
	 or (select(3, Vasa_UnitInfo("player")) <= Vasa_LowMana and UnitChannelInfo("player") == GetSpellInfo(115294)) --Mana Tea Channeling
	 or IsMounted()
	 or UnitBuffID("player", 104269) then --drink
		if PQI_VachiusaGeneral_RotationEngine_value == 4 then
			raidfu = nil
			vicon = nil
			CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", VAS_UpdateIcon)
		elseif PQI_VachiusaGeneral_RotationEngine_value == 7 and not UnitCastingInfo("player") then
			raidfu = nil
			vicon = nil
			HealBot_OnEvent_VachiusaUpdate(vicon,raidfu)
		elseif PQI_VachiusaGeneral_RotationEngine_value == 8 and not UnitCastingInfo("player") then
			raidfu = nil
			vicon = nil
			ElvUF_OnEvent_VachiusaUpdate(vicon,raidfu)
		end
		return true
	end

	-- Healing Engine --
	if Vasa_54EventsCheck then
		if not UnitDebuffID("player",144850) --Test of Reliance
		and not UnitDebuffID("player",142861) then --Ancient Miasma
			SheuronEngine(Vasa_Mouseover, Vasa_LowHP, Vasa_ActualHP, Vasa_TargetHeal, Vasa_SpecialEvents, Vasa_PetHeal)  -- Deactivate Mouseover  ||   At what % Health do we consider someone LowHP  ||  Sort by Actual Health = true
		end
	else
		SheuronEngine(Vasa_Mouseover, Vasa_LowHP, Vasa_ActualHP, Vasa_TargetHeal, Vasa_SpecialEvents, Vasa_PetHeal)  -- Deactivate Mouseover  ||   At what % Health do we consider someone LowHP  ||  Sort by Actual Health = true	
	end

	if GetCVarBool("PQ_UseCustomT") then
		members = Vasa_CustomT
		lowhpmembers = 0
		for i=1, #Vasa_CustomT do
			if Vasa_CustomT[i].HP < 80 then
				lowhpmembers = lowhpmembers + 1
			end
		end
		
		table.sort(members, function(x,y) return x.HP < y.HP end)
	end

	if Vasa_54EventsCheck 
	and UnitAffectingCombat("player") then
		local boss,bossid = bossid()
		local dispelid = 115450	
		local rangecheckid = 115175	
		local buff = { }
		stopcasting = false
		stopdps = false
		LLdebuff = false
		LLdebuffunit = false		
		if UnitExists(boss) then
			--local _, _, rdifficulty = GetInstanceInfo()
			if bossid == 71515 then --General Nazgrim
				if UnitBuffID("boss1", 143593) then --Defensive Stance
					stopdps = true				
				else
					stopdps = false
				end
			elseif bossid == 71995 or bossid == 71996 or bossid == 72000 then --Amalgam of Corruption - Norushen
				if UnitDebuffID("player",144850) --Test of Reliance
				then 
					BossSheuronEngine(Vasa_Mouseover, Vasa_LowHP, Vasa_ActualHP, Vasa_TargetHeal, 3, true, rangecheckid)  -- Deactivate Mouseover  ||   At what % Health do we consider someone LowHP  ||  Sort by Actual Health = true
					local buff  = { 144514 } --Lingering Corruption
					RaidDispel(dispelid,buff) 	
				end
			elseif bossid == 71475 or bossid == 71479 or bossid == 71480 then --The Fallen Protectors
				local buff  = { 143434 } --Shadow Word: Bane
				RaidDispel(dispelid,buff) 	
			elseif bossid == 71734 then --Sha of Pride
				if UnitDebuffID("player",144359) then
					local buff  = { 144351 } --Mark of Arrogance
					RaidDispel(dispelid,buff) 			
				end
			elseif bossid == 71454 then --Malkorok	
				local buff  = { 142913 } 	
				RaidRangeDispel(dispelid,buff,8) 	
				if UnitDebuffID("player",142861) then --Ancient Miasma			
					ShieldSheuronEngine(Vasa_Mouseover, Vasa_LowHP, Vasa_ActualHP, Vasa_TargetHeal, Vasa_PetHeal)  -- Deactivate Mouseover  ||   At what % Health do we consider someone LowHP  ||  Sort by Actual Health = true					
				end
			elseif bossid == 71161 and PQI_VachiusaGeneral_RotationEngine_value ~= 4 and PQI_VachiusaGeneral_RotationEngine_value ~= 7 and PQI_VachiusaGeneral_RotationEngine_value ~= 8 then --Kil'ruk the Wind-Reaver - Paragons of the Klaxxi
				if UnitDebuffID("player",141858) then --Ingenious			
					if not tIngenious or (#tIngenious > 0 and (GetTime() > tIngenious[1].Time + 30)) then
						tIngenious = { }						
						local qTime = GetTime() 
						local lastmax = 0
						local maxunit = "player"		
						local lasttype = "notype"						
						local ClassList = { {'WARRIOR', 0 }, {'PALADIN', 0 }, {'HUNTER', 0 }, {'ROGUE', 0 }, {'PRIEST', 0 }, {'DEATHKNIGHT', 0 }, {'SHAMAN', 0 }, {'MAGE', 0 }, {'WARLOCK', 0 }, {'MONK', 0 }, {'DRUID', 0 } }				
						local RaceList = { {'Draenei', 0 }, {'Gnome', 0 }, {'Human', 0 }, {'NightElf', 0 }, {'Worgen', 0 }, {'Pandaren', 0 }, {'BloodElf', 0 }, {'Goblin', 0 }, {'Orc', 0 }, {'Tauren', 0 }, {'Troll', 0 }, {'Scourge', 0 } }
						for i=1,25 do
							local unitCheck = "raid"..i
						    if UnitExists(unitCheck) and UnitIsPlayer(unitCheck) then
							local _, unitClass = UnitClass(unitCheck)				    	
							local _, unitRace = UnitRace(unitCheck)				    	
							if unitClass and UnitRace then	
									--Class
									for j=1, #ClassList do
										if unitClass == ClassList[j][1] then
											--VAS_WriteToChat("Debug1 - Num: " ..ClassList[j][2].." - Class: " ..ClassList[j][1])
											ClassList[j][2] = ClassList[j][2] + 1
											if ClassList[j][2] > lastmax then
												lastmax = ClassList[j][2]
												maxunit = unitCheck
												lasttype = ClassList[j][1]
											end												
										end		
									end
									--Race
									for j=1, #RaceList do
										if unitRace == RaceList[j][1] then
											--VAS_WriteToChat("Debug1 - Num: " ..RaceList[j][2].." - Race: " ..RaceList[j][1])
											RaceList[j][2] = RaceList[j][2] + 1
											if RaceList[j][2] > lastmax then
												lastmax = RaceList[j][2]
												maxunit = unitCheck
												lasttype = RaceList[j][1]
											end												
										end		
									end
							end			               	
						    end
						end				
						--VAS_WriteToChat("Debug1 - Unit: " ..maxunit.." - Type: " ..lasttype.." - Total: " ..lastmax.." - Time: " ..qTime)		
						table.insert(tIngenious, { Unit = maxunit, Type = lasttype, Total = lastmax, Time = qTime } )			
						return true								
					else
						if #tIngenious > 0 then			
							if UnitExists(tIngenious[1].Unit) 
							and IsSpellInRange(GetSpellInfo(rangecheckid),tIngenious[1].Unit) == 1
							and CanHeal(tIngenious[1].Unit) then	
							VAS_TargetUnit(tIngenious[1].Unit) 
						--Press the ExtraActionButton 
						VAS_RunMacroText("/click ExtraActionButton1")                     
						VAS_RunMacroText("/targetlasttarget")
						--VAS_WriteToChat("Ingenious Name: "..UnitName(tIngenious[1].Unit).." - Type: "..tIngenious[1].Type.." - Total: "..tIngenious[1].Total.." - Time: "..tIngenious[1].Time)						        					        	   	
							end
						end				
					end   				
				else
					tIngenious = false
				end
			elseif bossid == 71529 then --Thok the Bloodthirsty
				local buff  = { 143791 } --Corrosive Blood
				RaidDispel(dispelid,buff) 
				local DeafeningScreech = GetSpellInfo(143343) --Deafening Screech
				local bossCasting,_,_,_,_,castEnd = UnitCastingInfo(boss) 
				if (bossCasting == DeafeningScreech) then
					stopcasting = true
				end							
			end	
		end
	end

	-- QueueSys
	if Vasa_QueueSysCheck 
	then
		local dispelid = 115450	
		local rangecheckid = 115175		
		if #Queue_Sys > 0 then	
			if VAS_SpellAvailable(dispelid) 
			--and select(2,GetSpellCooldown(dispelid)) < 2
			and UnitExists(Queue_Sys[1].Unit)
			and IsUsableSpell(dispelid)
			and IsSpellInRange(GetSpellInfo(dispelid),Queue_Sys[1].Unit) == 1
			and CanHeal(Queue_Sys[1].Unit)
			and not VAS_IsOutOfSight(Queue_Sys[1].Unit) then
				if not UnitChannelInfo("player")
				and not UnitCastingInfo("player") 
				then	
					VAS_Cast(dispelid,Queue_Sys[1].Unit)					
					return true	
				end
			end
		end
		
		if Queue_Spell then
			if #Queue_Spell > 0 then	
				if GetTime() - Queue_Spell[1].Time >= 10 then
					--VAS_WriteToChat("Removed expired queue "..Queue_Spell[1].SpellID)
					Queue_Spell = { }				
					return true
				end			
				if #Queue_Spell > 1 then			
					if Queue_Spell[1].SpellID == Queue_Spell[2].SpellID and Queue_Spell[1].Unit == Queue_Spell[2].Unit then
						--VAS_WriteToChat("Removed dup queue "..Queue_Spell[1].SpellID)
						table.remove(Queue_Spell,2)	
						return true	
					end
				end
				
				local qunit = "player"
				if Queue_Spell[1].Unit == "low" then
					qunit = members[1].Unit
				elseif Queue_Spell[1].Unit == "tank" then
					if #Vasa_Tanks > 0 then
						for i=1, #Vasa_Tanks do
							if UnitThreatSituation(Vasa_Tanks[i].Unit) then
								qunit = Vasa_Tanks[i].Unit
								break
							end
						end
					end
					if UnitThreatSituation(members[1].Unit)	== 3 then
						qunit = members[1].Unit
					end			
				else
					qunit = Queue_Spell[1].Unit
				end
				
				if VAS_SpellAvailable(tonumber(Queue_Spell[1].SpellID)) 
				--and select(2,GetSpellCooldown(tonumber(Queue_Spell[1].SpellID))) < 2
				and UnitExists(qunit)
				then
					if not UnitChannelInfo("player")
					and not UnitCastingInfo("player") 
					then					
						local qmembers = members
						table.sort(qmembers, function(x) return UnitIsUnit(qunit,x.Unit) end)
						if UnitIsUnit(qmembers[1].Unit,qunit) then
							qunit = qmembers[1].Unit	
						else
							if IsSpellInRange(GetSpellInfo(Queue_Spell[1].SpellID),Queue_Spell[1].Unit) then
								qunit = Queue_Spell[1].Unit	
							else
								--VAS_WriteToChat("\124cFFFF55FFQueue System: Can not cast on that target!")
								qunit = "player"
							end
						end
						SpellSUCCEEDED(Queue_Spell[1].SpellID,qunit)
						VAS_Cast(Queue_Spell[1].SpellID,qunit)									
						return true						
					end
				end						
			end
		end	
	end

	-- Lightning Weaver toggle function
	if Vasa_LightningWeaverCheck then
		if not LightningWeaverMode then LightningWeaverMode = false end
		if not LightningWeaverModetimer then LightningWeaverModetimer = 0 end
		if (VachiusaMistMonk_LightningWeaver_key and not GetCurrentKeyBoardFocus()) and GetTime() - LightningWeaverModetimer > 1 then
			LightningWeaverModetimer = GetTime()	
			if LightningWeaverMode then
				LightningWeaverMode = false
				print("|cff347C2CLightningWeaver Mode: |cffDC143COff|cffffffff")
			else
				LightningWeaverMode = true
				print("|cff347C2CLightningWeaver Mode: |cff79BAECOn|cffffffff")		
			end
		end
	end

	--NPCMouseoverHeal
	if Vasa_NPCMouseoverHeal
	and UnitAffectingCombat("player")
	then
		local dispelid = 115450	
		local rangecheckid = 115175	
		if UnitExists("mouseover")				
		and not UnitIsPlayer("mouseover") then
			local npcID = tonumber(UnitGUID("mouseover"):sub(6,10), 16) 				
			if npcID == 71604 --Contaminated Puddle - Immerseus - SoO
			or npcID == 71995 or npcID == 71996 or npcID == 72000 --Norushen
			or npcID == 71357 --Wrathion		
			then				
				if IsSpellInRange(GetSpellInfo(rangecheckid),"mouseover")
				and Vasa_UnitInfo("mouseover") < 100 then	
					--RenewingMist
					if VAS_SpellAvailable(115151) 
					and not UnitBuffID("mouseover",115151,"player")
					and IsSpellInRange(GetSpellInfo(115151),"mouseover") == 1
					and not UnitCastingInfo("player")
					and IsUsableSpell(115151) then
						VAS_Cast(115151,"mouseover")	 
					end		
					
					--EnvelopingMist
					if VAS_SpellAvailable(124682) 		 
					 and IsSpellInRange(GetSpellInfo(124682),"mouseover") == 1		 
					 and (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
					 and IsUsableSpell(124682) then 	
						if UnitBuffID("mouseover",115175,"player") --Soothing Mist
						and not UnitBuffID("mouseover",124682,"player") --Enveloping Mist
						then					
							if select(5, Vasa_UnitInfo("player")) >= 3 
							and not UnitCastingInfo("player") then
								VAS_Cast(124682,"mouseover")	 
							elseif select(5, Vasa_UnitInfo("player")) == 0 
							and select(2,GetTalentRowSelectionInfo(3)) == 9 
							and not UnitCastingInfo("player") then		 		
								VAS_Cast(115399,"player") --Chi Brew	 
								VAS_Cast(124682,"mouseover")	 
							end		 			 		
						end
					end			
					
					--SurgingMist 
					if VAS_SpellAvailable(116694) 
					and IsUsableSpell(116694) 		
					and IsSpellInRange(GetSpellInfo(116694),"mouseover") == 1 then		
						if UnitBuffID("player",118674) then --Vital Mists
							if select(4, UnitBuffID("player",118674)) == 5 
							and not UnitCastingInfo("player") then
								VAS_Cast(116694,"mouseover")
							end
						end
						
						if (select(3, Vasa_UnitInfo("player")) > 70)
						then		
							if (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
							then 	
								if UnitBuffID("mouseover",115175,"player") --Soothing Mist
								and not UnitCastingInfo("player")
								then		
									if VAS_SpellAvailable(116680) --Thunder Focus Tea
									and not UnitBuffID("player",116680) then
										--if select(2,GetSpellCooldown(116680)) < 2 
										if select(5, Vasa_UnitInfo("player")) >= 3 
										and not UnitCastingInfo("player") then
											VAS_Cast(116680,"player")		 								
										end					
									end								
									VAS_Cast(116694,"mouseover")
								end
							end
						end
					end			
						
					--SoothingMist
					if VAS_SpellAvailable(115175)  
					and IsUsableSpell(115175) 
					and not Vasa_Moving 
					and IsSpellInRange(GetSpellInfo(115175),"mouseover") --Soothing Mist
					and not UnitBuffID("mouseover",115175,"player") --Soothing Mist
					and not UnitCastingInfo("player") then				
						VAS_Cast(115175,"mouseover")	 
						--VAS_WriteToChat("\124cFFFF55FFCast SoothingMist - Name: " ..UnitName("mouseover").." - HP: "..Vasa_UnitInfo("mouseover").." - NPCID: "..npcID) 
						return true
					end		
				end
			end		
		elseif UnitExists("focus")				
		and not UnitIsPlayer("focus") then
			local npcID = tonumber(UnitGUID("focus"):sub(6,10), 16) 				
			if npcID == 71604 --Contaminated Puddle - Immerseus - SoO
			or npcID == 71995 or npcID == 71996 or npcID == 72000 --Norushen
			or npcID == 71357 --Wrathion 
			then
				if IsSpellInRange(GetSpellInfo(rangecheckid),"focus") --FlashHeal
				then		
					local focushp = CalculateHP("focus")
					if focushp ~= nil and select(2, CalculateHP("focus")) ~= nil then
						table.insert(members, { Unit = "focus", HP = focushp, AHP = select(2, CalculateHP("focus")), IsNPC = true } )
					end
					if #members > 0 then
						table.sort(members, function(x,y) return x.HP < y.HP end)
					end				
				end
			end	
		end
	end

	if 100 * UnitPower("player") / UnitPowerMax("player") <= 50
	and not UnitCastingInfo("player")
	and not UnitAffectingCombat("player") 
	and VAS_SpellAvailable(80618) --Mage cookies	
	and not UnitBuffID("player", 104269)
	and not Vasa_Moving 
	and GetItemCount(80618,false,true) > 0	
	and GetItemCooldown(80618) == 0 then
		VAS_UseItemByName(80618)
		--VAS_WriteToChat("\124cFFFF55FFMage cookies - HP: " ..Vasa_UnitInfo("player")) 
		return true
	end

	--ChiBurst
	if Vasa_ChiBurstCheck then
		if not CB_Queue then CB_Queue = {} end	
		if select(2,GetTalentRowSelectionInfo(2)) == 6 then
			if select(2,GetSpellCooldown(123986)) > 2 then	
				CB_Queue = {}
				if acbturn then
					acbturn = false
					TurnRightStop() TurnLeftStop() 	 
				end
			end
			if #CB_Queue > 0 then
				if (GetTime() - CB_Queue[1].Time) > 3 then	
					CB_Queue = {}
				end
				if acbturn then
					acbturn = false
					TurnRightStop() TurnLeftStop() 	 
				end		
			end		
			if Vasa_Moving and acbturn then
				CB_Queue = {}
				acbturn = false
				TurnRightStop() TurnLeftStop() 	 		
			end	
		end
	end

	if Vasa_ChiBurstCheck
	and VAS_SpellAvailable(123986) 
	and select(2,GetTalentRowSelectionInfo(2)) == 6 		
	--and select(2,GetSpellCooldown(123986)) < 2
	and not stopdps		
	and not stopcasting 
	and not LLdebuff
	and not Vasa_Moving	
	and UnitAffectingCombat("player") 
	then							
		if not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		and lowhpmembers >= Vasa_ChiBurstLimit 
		then		
			if #CB_Queue < 1 then
				PRGetDistanceTable(Vasa_ChiBurst, 5, Vasa_ChiBurstLimit)	
				PRGetDistanceTablebyHP(Vasa_ChiBurst,Vasa_ChiBurstLimit)
													
				if IsSpellInRange(GetSpellInfo(115175),prdistancebyhp[1].Unit) == 1 --SM
				and not UnitIsUnit(prdistancebyhp[1].Unit, "player")
				and (prdistancebyhp[1].PD >= Vasa_ChiBurstLimit)
				and prdistancebyhp[1].HP <= Vasa_ChiBurst then
					table.insert(CB_Queue, { Unit = prdistancebyhp[1].Unit, Time = GetTime() } )
				end	
			end
			
			if #CB_Queue > 0 then
				local CBUnit = CB_Queue[1].Unit
				local px, tx, angle, dwt = VUnitFacing(CBUnit)
				if px ~= 0 
				and tx ~= 0 
				and not IsMouselooking()
				and dwt <= 40 then	
					if UnitChannelInfo("player")
					then
						VAS_SpellStopCasting()				
					end									
					if angle > 0 
					and angle < 16 then 
						acbturn = true
						TurnLeftStart() 			
						--VAS_WriteToChat("\124cFFFF55FFTurn Left")	
					end
					if angle > 15 
					and angle < 31 then 
						acbturn = true
						TurnRightStart() 				
						--VAS_WriteToChat("\124cFFFF55FFTurn Right")	
					end
					if angle == 31 
					or angle == 0 then 			
						TurnRightStop() TurnLeftStop() 	      		
						VAS_Cast(123986,nil)
						--VAS_WriteToChat("\124cFFFF55FFCast "..GetSpellInfo(123986).." - Name: " ..UnitName(CBUnit))					
					end						
				else
					CB_Queue = {}
				end			
				return true	
			end		
		end		
	end

	--Stop Casting
	if SpellIsTargeting() then
		VAS_SpellStopCasting()
	elseif (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
	and select(5, Vasa_UnitInfo("player")) >= 4 
	then
		for i=1, #members do
			if UnitBuffID(members[i].Unit,115175,"player") --Soothing Mist	
			and not UnitIsUnit("boss1", members[i].Unit)
			and (not IsSpellInRange(GetSpellInfo(115151),members[i].Unit) == 1 or CalStop(members[i].Unit) > Vasa_SoothingMist4Chi) then 
				if not UnitBuffID("player",137331) --Lucidity
				then
					VAS_SpellStopCasting()
					--VAS_WriteToChat("\124cFFFF55FFStop Cast Soothing Mist - Name: " ..UnitName(members[i].Unit).." - Current HP: "..CalStop(members[i].Unit).." - overheal: "..select(2, CalStop(members[i].Unit)))				
					return true
				else
					if VAS_SpellAvailable(116694) 
					then
						if CalStop(members[i].Unit) <= 99 then
							VAS_CustomTarget = members[i].Unit
							--VAS_WriteToChat("\124cFFFF55FFSurging Mist Lucidity - Name: " ..UnitName(members[i].Unit).." - Current HP: "..CalStop(members[i].Unit))			
							VAS_Cast(116694,members[i].Unit)						
						else
							VAS_SpellStopCasting()						
							return true
						end
					end
				end
			end		
		end
	elseif (UnitCastingInfo("player") == GetSpellInfo(116694)) then --SurgingMist
		VAS_SpellStopCasting()
		--VAS_WriteToChat("\124cFFFF55FFStop Cast SurgingMist")	
		return true
	elseif (UnitCastingInfo("player") == GetSpellInfo(124682)) then --EnvelopingMist
		VAS_SpellStopCasting()
		--VAS_WriteToChat("\124cFFFF55FFStop Cast EnvelopingMist")	
		return true	
	end

	--StanceOfTheWiseSerpent
	if GetShapeshiftForm()~=1 
	and not UnitCastingInfo("player") then
		VAS_CastShapeshiftForm(1)
	end

	--LegacyOfTheEmperor
	if not UnitBuffID("player",1126)
	and not UnitBuffID("player",20217)
	and not UnitBuffID("player",90363)
	and not UnitBuffID("player",115921) 
	and VAS_SpellAvailable(115921)
	and IsUsableSpell(115921) 
	and not UnitCastingInfo("player")
	then
		VAS_Cast(115921,"player")
		return true
	end

	if not UnitBuffID("player", 79640) --Enhanced Intellect - Flask of Enhancement from Alchemist Flask
	and not UnitBuffID("player", 105689) --Flask of Spring Blossoms	
	and not UnitBuffID("player", 105694) --Flask of the Earth	
	and not UnitBuffID("player", 105693) --Flask of Falling Leaves
	and not UnitBuffID("player", 105691) --Flask of the Warm Sun
	and not UnitBuffID("player", 105696) --Flask of Winter's Bite
	and GetItemCount(75525,false,false) > 0 
	and ( select(2, GetItemCooldown(75525)) == 0 ) 
	--and not UnitChannelInfo("player")
	then
	    VAS_UseItemByName(75525)
	    return true
	end

	--JadeSerpentStatue
	if Vasa_JadeSerpentStatueCheck then	
		if (VachiusaMistMonk_JadeSerpentStatue_key and not GetCurrentKeyBoardFocus()) then
			if not UnitChannelInfo("player") 
			and IsUsableSpell(115313) 
			and VAS_SpellAvailable(115313)
			--and select(2,GetSpellCooldown(115313)) < 2 
			and not UnitCastingInfo("player")
			then
			  VAS_aoeCast(115313,nil)
			  --if SpellIsTargeting() then CameraOrSelectOrMoveStart() CameraOrSelectOrMoveStop() end  
			  --VAS_WriteToChat("\124cFFFF55FFLeft Control Key Down - Summon Jade Serpent Statue!")
			  return true
			end
		end
	end

	--HealingSphere (TC)
	if Vasa_HealingSphereCheck then	
		if (VachiusaMistMonk_HealingSphere_key and not GetCurrentKeyBoardFocus()) then
			if not UnitChannelInfo("player") 
			and VAS_SpellAvailable(115460)
			--and GetSpellCooldown(115460) == 0
			and IsUsableSpell(115460)
			and not UnitCastingInfo("player")
			then
			  VAS_aoeCast(115460,nil)
			  --if SpellIsTargeting() then CameraOrSelectOrMoveStart() CameraOrSelectOrMoveStop() end  
			  --VAS_WriteToChat("\124cFFFF55FFRight Alt Key Down - Healing Sphere!")
			  return true
			end
		end		
	end

	--CracklingJadeLightning (TC)
	if Vasa_CracklingJadeLightningCheck then	
		if (VachiusaMistMonk_CracklingJadeLightning_key and not GetCurrentKeyBoardFocus()) then
			if VAS_SpellAvailable(117952) 
			and IsUsableSpell(117952) 
			and UnitExists("target") 
			and not VAS_IsOutOfSight("target")
			and not UnitIsDeadOrGhost("target")
			and not Vasa_Moving
			and IsSpellInRange(GetSpellInfo(117952),"target") == 1
			and not UnitCastingInfo("player")
			and UnitCanAttack("player", "target") then
				VAS_Cast(117952,"target")
				return true 
			end
		end		
	end

	--Zen Meditation (TC)
	if Vasa_ZenMeditationCheck then	
		if (VachiusaMistMonk_ZenMeditation_key and not GetCurrentKeyBoardFocus()) then		
			if VAS_SpellAvailable(115176) 
			--and GetSpellCooldown(115176) == 0
			and UnitAffectingCombat("player")
			and not Vasa_Moving 
			and not UnitChannelInfo("player")
			and not UnitCastingInfo("player") 
			and not stopcasting then
				VAS_Cast(115176,nil)
				return true 
			end
		end
	end

	if Vasa_UnitInfo("player") <= 20 
	and UnitAffectingCombat("player") then
		if GetItemCount(5512,false,true) > 0	
		and VAS_SpellAvailable(5512) --Healthstone		
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and GetItemCooldown(5512) == 0 then
			if UnitCastingInfo("player") then
				VAS_SpellStopCasting()
			end	
			VAS_UseItemByName(5512)
			--VAS_WriteToChat("\124cFFFF55FFHealthstone - HP: " ..Vasa_UnitInfo("player")) 
			return true
		--elseif GetInventoryItemCooldown(6)==0 --Grounded Plasma Shield 	
		--then 
			--VAS_UseInventoryItem(6) 
			--return true
		--The next 3 attacks within 45 sec that deal damage equal to 20% or more of your total health are reduced in half.
		elseif VAS_SpellAvailable(122278)	
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation	
		and select(2,GetTalentRowSelectionInfo(5)) == 14
		--and select(2,GetSpellCooldown(122278)) < 2 
		--and IsUsableSpell(115176) 	
		then
			if UnitCastingInfo("player") then
				VAS_SpellStopCasting()
			end		
			VAS_Cast(122278,nil)	 			
			--VAS_WriteToChat("\124cFFFF55FFDampen Harm!")	
			return true		
		elseif VAS_SpellAvailable(115203)	
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation		
		--and select(2,GetSpellCooldown(115203)) < 2 
		and not UnitBuffID("player",122278) then --Dampen Harm
			if UnitCastingInfo("player") then
				VAS_SpellStopCasting()
			end		
			VAS_Cast(115203,nil)	 	
			--VAS_WriteToChat("\124cFFFF55FFFortifying Brew - My HP: "..Vasa_UnitInfo("player"))	
			return true		
		end
	end

	--LifeCocoon
	if Vasa_LifeCocoonCheck then
		if VAS_SpellAvailable(116849) 	 
		 and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation	 
		 and UnitAffectingCombat("player")
		 --and select(2,GetSpellCooldown(116849)) < 2
		 and UnitThreatSituation(members[1].Unit) == 3
		 and IsUsableSpell(116849)
		 and IsSpellInRange(GetSpellInfo(116849),members[1].Unit) == 1 then
			if members[1].HP < Vasa_LifeCocoon 		
			and UnitGroupRolesAssigned(members[1].Unit) ~= "NONE" then --Vasa_LifeCocoon 
				if UnitCastingInfo("player") then
					VAS_SpellStopCasting()
				end			
				--VAS_WriteToChat("\124cFFFF55FFLifeCocoon - HP: " ..members[1].HP) 	
				VAS_Cast(116849,members[1].Unit)	
				return true
			end
		end
	end

	--Revival
	if Vasa_RevivalCheck then
		if VAS_SpellAvailable(115310)	
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation	
		--and select(2,GetSpellCooldown(115310)) < 2
		and IsUsableSpell(115310) 	
		and not LLdebuff 	
		and UnitAffectingCombat("player")
		then
			if AverageHealth(Vasa_RevivalLimit) <= Vasa_Revival then
				if UnitCastingInfo("player") then
					VAS_SpellStopCasting()
				end			
				--VAS_WriteToChat("\124cFFFF55FFRevival - Raid HP: "..AverageHealth(4))		
				VAS_Cast(115310,"player")					
				return true
			end
		end
	end

	--ManaTea
	if Vasa_ManaTeaCheck then
		if VAS_SpellAvailable(115294)
		and not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning 
		then
			if UnitBuffID("player", 115867) then --Mana Tea buff
				if (select(4, UnitBuffID("player", 115867)) >= Vasa_ManaTeaLimit --Vasa_ManaTeaLimit
				 and select(3, Vasa_UnitInfo("player")) <= Vasa_ManaTea) --Vasa_ManaTea		 
				 or UnitBuffID("player",64904) --Hymm of Hope
				 or select(3, Vasa_UnitInfo("player")) <= Vasa_LowMana 
				 and not UnitCastingInfo("player") then
					if GlyphCheck(123763) then --124450					
						if select(2,GetSpellCooldown(123761)) < 2												
						then
							--VAS_WriteToChat("\124cFFFF55FF ManaTea")
							VAS_Cast(115294,"player")	
							return true
						end			 	
					else					
						VAS_Cast(115294,"player")	
						return true			 	
					end
				end
			end
		end
	end

	if 100 * UnitPower("player") / UnitPowerMax("player") < 80
	and GetInventoryItemCooldown("player",14) == 0
	and not UnitCastingInfo("player")
	then VAS_UseInventoryItem(14)
	end

	--TsulongHeal 
	if Vasa_53EventsCheck then	
		local bossCheck = "boss1" 
		local tsulongboss = false
		if UnitExists(bossCheck) then 
			local npcID = tonumber(UnitGUID(bossCheck):sub(6,10), 16) 	        
			if npcID == 62442 
			and UnitAffectingCombat("player") then --Tsulong	
				--VAS_WriteToChat("\124cFFFF55FFDebug NPCID: " ..npcID) 
				tsulongboss = true
			end
		end	
		
		if tsulongboss
		and VAS_SpellAvailable(115175)  	
		and IsUsableSpell(115175) 
		and IsSpellInRange(GetSpellInfo(115175),"boss1") == 1
		then
			if Vasa_UnitInfo("boss1") < 100 then
				local prepairBIL = false
				local BathedInLight = GetSpellInfo(122858) --Sun Breath 122855
				if (bossCasting == BathedInLight) then
					prepairBIL = true
				end
						
				--LifeCocoon
				if VAS_SpellAvailable(116849) 
				 and ((UnitDebuff("player","Bathed in Light") or UnitDebuff("player","Омовение светом") or UnitDebuff("player","In Licht gebadet")) --Bathed in Light buff		
					or prepairBIL)
				 --and select(2,GetSpellCooldown(116849)) < 2		 		 
				 and IsUsableSpell(116849)		 
				 and not UnitBuffID("boss1",116849) --LifeCocoon
				 and not UnitBuffID("boss1",47788)	--Guardian Spirit
				 and not UnitCastingInfo("player")
				 and IsSpellInRange(GetSpellInfo(116849),"boss1") == 1 then
					VAS_Cast(116849,"boss1")	 
				end
		
				--RenewingMist
				if VAS_SpellAvailable(115151) 
				and not UnitBuffID("boss1",115151,"player")
				and IsSpellInRange(GetSpellInfo(115151),"boss1") == 1
				and not UnitCastingInfo("player")
				and IsUsableSpell(115151) then
					VAS_Cast(115151,"boss1")	 
				end		
				
				--EnvelopingMist
				if VAS_SpellAvailable(124682) 		 
				 and IsSpellInRange(GetSpellInfo(124682),members[1].Unit) == 1		 
				 and (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
				 and IsUsableSpell(124682) then 	
					if UnitBuffID("boss1",115175,"player") --Soothing Mist
					and not UnitBuffID("boss1",124682,"player") --Enveloping Mist
					then					
						if select(5, Vasa_UnitInfo("player")) >= 3 
						and not UnitCastingInfo("player") then
							VAS_Cast(124682,"boss1")	 
						elseif select(5, Vasa_UnitInfo("player")) == 0 
						and select(2,GetTalentRowSelectionInfo(3)) == 9 
						and not UnitCastingInfo("player") then		 		
							VAS_Cast(115399,"player")	 
							VAS_Cast(124682,"boss1")	 
						end		 			 		
					end
				end
				
				--ZenSphereSmart
				if VAS_SpellAvailable(124081) 
				and not UnitBuffID("boss1",124081,"player")
				and IsSpellInRange(GetSpellInfo(124081),"boss1") 		
				and not UnitCastingInfo("player") then									
					VAS_Cast(124081,"boss1")			
				end	
									
				--SurgingMist - need Thunder Focus Tea?
				if VAS_SpellAvailable(116694) 
				and IsUsableSpell(116694) 		
				and IsSpellInRange(GetSpellInfo(116694),"boss1") == 1 then		
					if UnitBuffID("player",118674) then --Vital Mists
						if select(4, UnitBuffID("player",118674)) == 5 
						and not UnitCastingInfo("player") then
							VAS_Cast(116694,"boss1")
						end
					end
					
					if (select(3, Vasa_UnitInfo("player")) > 70 or UnitDebuff("player","Bathed in Light") or UnitDebuff("player","Омовение светом") or UnitDebuff("player","In Licht gebadet")) --Bathed in Light buff		
					then		
						if (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
						 then 	
							if UnitBuffID("boss1",115175,"player") --Soothing Mist
							and not UnitCastingInfo("player")
							then		
								if VAS_SpellAvailable(116680) --Thunder Focus Tea
								and not UnitBuffID("player",116680) then
									--if select(2,GetSpellCooldown(116680)) < 2 
									if select(5, Vasa_UnitInfo("player")) >= 3 
									and not UnitCastingInfo("player") then
										VAS_Cast(116680,"player")		 								
									end					
								end								
								VAS_Cast(116694,"boss1")
							end
						end
					end
				end
		
				if members[1].HP > 30 --Prevent raid wipe
				and lowhpmembers < 10 then 
					--SoothingMist
					if VAS_SpellAvailable(115175) 
					 and IsUsableSpell(115175) 
					 and not Vasa_Moving 			 
					 and IsSpellInRange(GetSpellInfo(115175),"boss1") == 1 
					 and not UnitCastingInfo("player") then				
						VAS_Cast(115175,"boss1")
					end
				end
			end
		end
	end

	if not UnitAffectingCombat("player") 
	and UnitIsConnected("mouseover")
	and UnitCanCooperate("player","mouseover") 			
	and UnitIsDeadOrGhost("mouseover") 
	and not UnitHasIncomingResurrection("mouseover") 
	then		
		if VAS_SpellAvailable(83968) 		
		and not UnitDebuff("mouseover", GetSpellInfo(95223)) ----Mass Resurrection debuff
		and Vasa_CheckLastCast(83968, 2.0)		
		then
			if IsInRaid() then
					group = "raid"
			elseif IsInGroup() then
					group = "party"
			end
			local deadnum = 0
			if group then
				for i = 1, GetNumGroupMembers() do 
					local member = group..i
					if UnitIsDeadOrGhost(member) then
						if not UnitDebuff(member, GetSpellInfo(95223)) then ----Mass Resurrection debuff 
							deadnum = deadnum + 1
						end
					end
				end
			end		
			if deadnum >= 2 
			and not UnitCastingInfo("player") then
				VAS_Cast(83968,nil) --Mass Resurrection	 
				--VAS_WriteToChat("\124cFFFF55FFMouseover - Auto MasRes!")
				return true		
			end
		end
		
		if VAS_SpellAvailable(115178)
		and IsUsableSpell(115178) 	
		and Vasa_CheckLastCast(115178, 2.0)	
		and (IsSpellInRange(GetSpellInfo(115178),"mouseover") == 1) 		
		and not VAS_IsOutOfSight("mouseover")
		and not UnitCastingInfo("player") then 
			VAS_Cast(115178,"mouseover") --Resurrection	 
			--VAS_WriteToChat("\124cFFFF55FFMouseover - Auto Res!")
			return true			
		end			
	end

	if Vasa_RenewingMistCheck or Vasa_SpamRenewingMistCheck then
		if VAS_SpellAvailable(115151) 
		and IsUsableSpell(115151)
		--and select(2,GetSpellCooldown(115151)) < 2 
		and not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		then
			if members[1].HP <= Vasa_RenewingMistTank then
				PRGetDistanceTablebuff(Vasa_RenewingMistTank, 40, 2, 115151)	
				PRGetDistanceTablebyHPbuff(Vasa_RenewingMistTank,2)					
				if IsSpellInRange(GetSpellInfo(115151),prdistancebyhpbuff[1].Unit) 
				and (prdistancebyhpbuff[1].PD >= 2) then
					if (UnitThreatSituation(prdistancebyhpbuff[1].Unit) == 3 and prdistancebyhpbuff[1].HP <= Vasa_RenewingMistTank) or prdistancebyhpbuff[1].HP <= Vasa_RenewingMist 
					and not UnitCastingInfo("player") then			
						VAS_Cast(115151,prdistancebyhpbuff[1].Unit)
						--VAS_WriteToChat("\124cFFFF55FFRenew member - HP: "..prdistancebyhpbuff[1].HP)						
						return true
					end	
				end			
			end
			
			if Vasa_SpamRenewingMistCheck 
			and not UnitBuffID(members[1].Unit,115151,"player")	
			and IsSpellInRange(GetSpellInfo(115151),members[1].Unit) 
			and not UnitCastingInfo("player")
			then
				VAS_Cast(115151,members[1].Unit)
				--VAS_WriteToChat("\124cFFFF55FFRenew2 member - HP: "..members[1].HP)				
				return true				
			end										
		end
	end

	--ZenSphereSmart
	if select(2,GetTalentRowSelectionInfo(2)) == 5 
	and select(2,GetSpellCooldown(124081)) < 2 then				
		local zsc = 0
		if UnitBuffID("boss1",124081,"PLAYER") then
			zsc = zsc + 1
		end
		for i=1, #members do	
			if UnitBuffID(members[i].Unit,124081,"PLAYER") then
				zsc = zsc + 1
				--VAS_WriteToChat("\124cFFFF55FFShield on: "..UnitName(members[i].Unit))
			end
			if zsc == 2 then
				break
			end
		end
		
		if not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		and UnitAffectingCombat("player") 
		and lowhpmembers >= Vasa_ZenSphereLimit		
		and zsc < 2
		then
			
			PRGetDistanceTable(Vasa_ZenSphere,10,Vasa_ZenSphereLimit)	
			PRGetDistanceTablebyHP(Vasa_ZenSphere,Vasa_ZenSphereLimit)
												
			if Vasa_ZenSphereCheck
			--and not stopdps				
			and VAS_SpellAvailable(124081) 
			and not Vasa_Moving	then						
				if IsSpellInRange(GetSpellInfo(124081),prdistancebyhp[1].Unit) 
				and not UnitCastingInfo("player")
				and (prdistancebyhp[1].PD >= Vasa_ZenSphereLimit)
				and prdistancebyhp[1].HP <= Vasa_ZenSphere then	
					if not UnitBuffID(prdistancebyhp[1].Unit,124081,"PLAYER") then
						VAS_Cast(124081,prdistancebyhp[1].Unit)
						--VAS_WriteToChat("\124cFFFF55FFCast Zen Sphere1 - Name: " ..UnitName(prdistancebyhp[1].Unit).." - HP: "..prdistancebyhp[1].HP.." - total around: "..prdistancebyhp[1].PD.." - zsc: "..zsc) 
						return true
					elseif #prdistancebyhp > 1 then
						VAS_Cast(124081,prdistancebyhp[2].Unit)
						--VAS_WriteToChat("\124cFFFF55FFCast Zen Sphere2 - Name: " ..UnitName(prdistancebyhp[2].Unit).." - HP: "..prdistancebyhp[2].HP.." - total around: "..prdistancebyhp[2].PD.." - zsc: "..zsc) 
						return true					
					end
				end					
			end
		end	
	end

	--ChiWaveSmart
	if select(2,GetTalentRowSelectionInfo(2)) == 4 
	and select(2,GetSpellCooldown(115098)) < 2 then				
			if not UnitBuffID("player",101546) --Spinning Crane Kick
			and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
			and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
			and UnitAffectingCombat("player") 
			and lowhpmembers >= Vasa_ChiWaveLimit
			then
				
				PRGetDistanceTable(Vasa_ChiWave,20,Vasa_ChiWaveLimit)	
				PRGetDistanceTablebyHP(Vasa_ChiWave,Vasa_ChiWaveLimit)
													
				if Vasa_ChiWaveCheck
				and VAS_SpellAvailable(115098) 
				and not Vasa_Moving	then						
					if IsSpellInRange(GetSpellInfo(115098),prdistancebyhp[1].Unit) 
					and not UnitCastingInfo("player")
					and (prdistancebyhp[1].PD >= Vasa_ChiWaveLimit)
					and prdistancebyhp[1].HP <= Vasa_ChiWave then									
						VAS_Cast(115098,prdistancebyhp[1].Unit)
						--VAS_WriteToChat("\124cFFFF55FFCast Vasa_ChiWave - Name: " ..UnitName(prdistancebyhp[1].Unit).." - HP: "..prdistancebyhp[1].HP.." - total around: "..prdistancebyhp[1].PD) 				
						return true
					end					
				end
			end	
	end

	--RushingJadeWind
	if Vasa_RushingJadeWindCheck then
		if VAS_SpellAvailable(116847) 
		and select(2,GetTalentRowSelectionInfo(6)) == 16 
		--and select(2,GetSpellCooldown(116847)) < 2 
		and IsUsableSpell(116847) 	
		and not UnitCastingInfo("player") 
		then
			 if AverageHealth(Vasa_RushingJadeWindLimit) <= Vasa_RushingJadeWind then		 	
				local real_b = 0
				if #members > 1 then
					for i=1,#members do		
						if VAS_UnitDistance("player",members[i].Unit) and members[i].HP then
							if VAS_UnitDistance("player",members[i].Unit) <= 8 
							and not UnitIsUnit("player",members[i].Unit) 
							and members[i].HP <= Vasa_RushingJadeWind then
								real_b = real_b + 1					
								if real_b >= Vasa_RushingJadeWindLimit then
									break
								end									
							end
						end
					end
					if real_b >= Vasa_RushingJadeWindLimit 
					then
						VAS_Cast(116847,nil)
						--VAS_WriteToChat("\124cFFFF55FFRushing Jade Wind")						
						return true					
					end
				end	
			end
		end	
	end

	--UpliftSmart
	if not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	then
		
		local upliftcount=0
		local rmcount=0
		for i=1, #members do
			if UnitBuffID(members[i].Unit,115151,"player")				
			then 	
				rmcount = rmcount + 1	
				if members[i].HP <= Vasa_Uplift then
					upliftcount = upliftcount + 1
					if upliftcount >= Vasa_UpliftCount+1 then
						break
					end
				end
			end
		end		
																
		if VAS_SpellAvailable(116670)			
		and Vasa_UpliftCheck 
		and select(5, Vasa_UnitInfo("player")) >= 2 then
			if (upliftcount >= Vasa_UpliftCount --Vasa_UpliftCount
			and ((select(5, Vasa_UnitInfo("player")) >= 2) and (select(3, Vasa_UnitInfo("player")) > Vasa_LowMana)))
			or (select(5, Vasa_UnitInfo("player")) >= 4
			and (upliftcount >= (Vasa_UpliftCount-1)))
			or (select(5, Vasa_UnitInfo("player")) >= 4
			and UnitBuffID("player",137331)) then --Meta gem Lucidity
				if select(5, Vasa_UnitInfo("player")) < 1 
				and not UnitCastingInfo("player")
				and (upliftcount >= (Vasa_UpliftCount+1))
				and select(2,GetTalentRowSelectionInfo(3)) == 9 then		 		
					VAS_Cast(115399,nil)	 
						--VAS_WriteToChat("\124cFFFF55FFCast Chi Brew then UpLift")				
				end				
				
				if VAS_SpellAvailable(116680) --Thunder Focus Tea
				and not UnitBuffID("player",116680) 
				and not UnitCastingInfo("player")
				--and select(2,GetSpellCooldown(116680)) < 2 
				and select(5, Vasa_UnitInfo("player")) >= 3 
				and ((upliftcount >= Vasa_TFTeaUplift and Vasa_TFTeaUpliftCheck) 
				or (rmcount >= Vasa_TFTReM and Vasa_TFTReMCheck)) then
					VAS_Cast(116680,nil)	 
					--VAS_WriteToChat("\124cFFFF55FFCast Thunder Focus Tea then Uplift - UpliftCount: " ..upliftcount) 
				end						
				
				if select(5, Vasa_UnitInfo("player")) >= 2 
				and not UnitCastingInfo("player") then
					VAS_Cast(116670,nil)	 
					--VAS_WriteToChat("\124cFFFF55FFCast Uplift - UpliftCount: " ..upliftcount) 							
					return true
				end
			end			
		end
	end

	--ChiBurst
	if select(2,GetTalentRowSelectionInfo(2)) == 6 then				
		if Vasa_ChiBurstCheck then	
			if (VachiusaMistMonk_ChiBurst_key and not GetCurrentKeyBoardFocus()) then
				if VAS_SpellAvailable(123986) 
				and not Vasa_Moving		
				and not stopcasting 
				and not LLdebuff				
				and not UnitCastingInfo("player")
				then
					VAS_Cast(123986,nil)
					return true 
				end
			end		
		end
	end

	--SpinningCraneKick (TC)
	if Vasa_SpinningCraneKickCheck then	
		if (VachiusaMistMonk_SpinningCraneKick_key and not GetCurrentKeyBoardFocus()) then
			if VAS_SpellAvailable(101546) 
			and IsUsableSpell(101546) 
			and not UnitCastingInfo("player") then
				VAS_Cast(101546,nil)
				return true 
			end
		end
	end

	if Vasa_SpinningCKickCheck then
		if VAS_SpellAvailable(101546) 
		and IsUsableSpell(101546) 
		and not UnitBuffID("player",139597) --Muscle Memory
		and select(3, Vasa_UnitInfo("player")) >= 20
		and not UnitCastingInfo("player") 
		and not stopcasting then
			 if AverageHealth(Vasa_SpinningCKickLimit) <= Vasa_SpinningCKick then		 	
				local real_b = 0
				if #members > 1 then
					for i=1,#members do		
						if VAS_UnitDistance("player",members[i].Unit) and members[i].HP then
							if VAS_UnitDistance("player",members[i].Unit) <= 8 
							and not UnitIsUnit("player",members[i].Unit) 
							and members[i].HP <= Vasa_SpinningCKick then
								real_b = real_b + 1					
								if real_b >= Vasa_SpinningCKickLimit then
									break
								end									
							end
						end
					end
					if real_b >= Vasa_SpinningCKickLimit 
					and select(5, Vasa_UnitInfo("player")) <= 3 then
						VAS_Cast(101546,nil)
						return true					
					end
				end	
			end
		end	
	end

	--SurgingMist
	if Vasa_SurgingMistCheck then
		if VAS_SpellAvailable(116694) 
		and IsUsableSpell(116694) 
		and not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		and IsSpellInRange(GetSpellInfo(116694),members[1].Unit) == 1
		then
			if members[1].HP < Vasa_SurgingMistInstant --Vasa_SurgingMistInstant
			and UnitBuffID("player",118674) then --Vital Mists
				if select(4, UnitBuffID("player",118674)) == 5 
				and not UnitCastingInfo("player") then
					if Vasa_TFTeaSurgingMistCheck then
						if VAS_SpellAvailable(116680) --Thunder Focus Tea
						and not UnitBuffID("player",116680) then					
							--if select(2,GetSpellCooldown(116680)) < 2 
							if select(5, Vasa_UnitInfo("player")) >= 1 
							and members[1].HP <= Vasa_TFTeaSurgingMist 
							then
								VAS_Cast(116680,nil)	 
								--VAS_WriteToChat("\124cFFFF55FFCast Thunder Focus Tea then SurgingMist - HP: "..members[1].HP)
							end		
						end					
					end			
					VAS_CustomTarget = members[1].Unit
					--VAS_WriteToChat("\124cFFFF55FFInstant Surging Mist - HP: " ..members[1].HP)
					VAS_Cast(116694,members[1].Unit)
					return true
				end
			end
			
			if (members[1].HP < Vasa_SurgingMist --Vasa_SurgingMist
			and not UnitBuffID("player",137331)
			and (select(3, Vasa_UnitInfo("player")) > (Vasa_LowMana-5))) --Vasa_LowMana		
			or (members[1].HP <= 99 
			and UnitBuffID("player",137331)) --Meta gem Lucidity
			then
				if (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
				 then 	
					if UnitBuffID(members[1].Unit,115175,"player") --Soothing Mist		
					and not UnitCastingInfo("player")
					then		
						if Vasa_TFTeaSurgingMistCheck 
						and not UnitBuffID("player",137331) then --Meta gem Lucidity
							if VAS_SpellAvailable(116680) --Thunder Focus Tea
							and not UnitBuffID("player",116680) then					
								--if select(2,GetSpellCooldown(116680)) < 2 
								if select(5, Vasa_UnitInfo("player")) >= 1 
								and members[1].HP <= Vasa_TFTeaSurgingMist 
								then
									VAS_Cast(116680,nil)	 
									--VAS_WriteToChat("\124cFFFF55FFCast Thunder Focus Tea then SurgingMist - HP: "..members[1].HP)
								end		
							end					
						end							
						VAS_CustomTarget = members[1].Unit
						--VAS_WriteToChat("\124cFFFF55FFSurging Mist - HP: " ..members[1].HP)
						if UnitBuffID("player",137331) then --Meta gem Lucidity
							--VAS_WriteToChat("\124cFFFF55FFSurging Mist Lucidity 2 - Name: " ..UnitName(members[1].Unit).." - Current HP: "..CalStop(members[1].Unit))			
						end
						VAS_Cast(116694,members[1].Unit)
						return true
					end
				end
			end
		end
	end

	--EnvelopingMist
	if Vasa_EnvelopingMistCheck then
		if members[1].HP < Vasa_EnvelopingMist then
			if VAS_SpellAvailable(124682) 
			 and not UnitBuffID("player",101546) --Spinning Crane Kick
			 and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
			 and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
			 and IsSpellInRange(GetSpellInfo(124682),members[1].Unit) == 1
			 and (UnitChannelInfo("player") == GetSpellInfo(115175)) --Soothing Mist
			 and IsUsableSpell(124682) then 	
				if UnitBuffID(members[1].Unit,115175,"player") --Soothing Mist
				and not UnitBuffID(members[1].Unit,124682,"player") --Enveloping Mist
				then					
					if select(5, Vasa_UnitInfo("player")) >= 3 
					and not UnitCastingInfo("player") then
						VAS_CustomTarget = members[1].Unit
						--VAS_WriteToChat("\124cFFFF55FFCast EM - HP: " ..members[1].HP)
						VAS_Cast(124682,members[1].Unit)
						return true
					elseif select(5, Vasa_UnitInfo("player")) == 0 
					and select(2,GetTalentRowSelectionInfo(3)) == 9 
					and not UnitCastingInfo("player") then		 		
						VAS_Cast(115399,nil)	 
						--VAS_WriteToChat("\124cFFFF55FFCast Chi Brew then EM - HP: " ..members[1].HP)
						VAS_CustomTarget = members[1].Unit
						VAS_Cast(124682,members[1].Unit)
						return true	
					end		 			 		
				end
			end
		end
	end

	--SoothingMist
	local mdps = false
	if UnitAffectingCombat("player")
	and Vasa_DPSCheck
	and UnitExists("target") 
	and not VAS_IsOutOfSight("target")
	and not UnitIsDeadOrGhost("target")
	and IsSpellInRange(GetSpellInfo(100787),"target") == 1	
	and UnitCanAttack("player", "target") then
		mdps = true
	end
		
	if Vasa_SoothingMistCheck and not mdps then
		 if VAS_SpellAvailable(115175) 
		 and not UnitBuffID("player",101546) --Spinning Crane Kick
		 and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		 and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning	 
		 and IsUsableSpell(115175) 
		 and not Vasa_Moving 
		 and not UnitBuffID("player",131523) --Zen Meditation
		 and not UnitBuffID(members[1].Unit,115175,"player") --Soothing Mist
		 and IsSpellInRange(GetSpellInfo(115175),members[1].Unit) == 1 
		 and not UnitCastingInfo("player") 
		 and not stopcasting then				
			if members[1].HP <= Vasa_SoothingMist --SoothingMist
			and select(5, Vasa_UnitInfo("player")) >= 4
			and not UnitBuffID("player",137331) --Meta gem Lucidity
			then
				VAS_CustomTarget = members[1].Unit	
				VAS_Cast(115175,members[1].Unit)		
				--VAS_WriteToChat("\124cFFFF55FFCast Soothing Mist - Name: " ..UnitName(members[1].Unit).." - Current HP: "..CalStop(members[1].Unit))			
				return true
			elseif members[1].HP <= Vasa_SoothingMist4Chi 
			and select(3, Vasa_UnitInfo("player")) >= 15  --mana
			and select(5, Vasa_UnitInfo("player")) < 4 		
			and not UnitBuffID("player",137331) --Meta gem Lucidity
			then  
				VAS_CustomTarget = members[1].Unit	
				VAS_Cast(115175,members[1].Unit)		
				--VAS_WriteToChat("\124cFFFF55FFCast Soothing Mist 4C - Name: " ..UnitName(members[1].Unit).." - Current HP: "..CalStop(members[1].Unit))			
				return true		
			elseif members[1].HP <= 99 --SoothingMist
			and UnitBuffID("player",137331) --Meta gem Lucidity
			then			
				VAS_CustomTarget = members[1].Unit	
				VAS_Cast(115175,members[1].Unit)		
				--VAS_WriteToChat("\124cFFFF55FFCast Soothing Mist 4L - Name: " ..UnitName(members[1].Unit).." - Current HP: "..CalStop(members[1].Unit))			
				return true			 	
			elseif members[1].HP <= 200 --SoothingMist
			and select(5, Vasa_UnitInfo("player")) < 4
			and UnitBuffID("player",137331) --Meta gem Lucidity
			then			
				VAS_CustomTarget = members[1].Unit	
				VAS_Cast(115175,members[1].Unit)		
				--VAS_WriteToChat("\124cFFFF55FFCast Soothing Mist 4L - Name: " ..UnitName(members[1].Unit).." - Current HP: "..CalStop(members[1].Unit))			
				return true			 	
			end
		end
	end

	if select(5, Vasa_UnitInfo("player")) < 4
	and (Vasa_UnitInfo("player") <= 90 or Vasa_SpamExpelHarmCheck)
	and not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	and VAS_SpellAvailable(115072) 
	--and select(2,GetSpellCooldown(115072)) < 2
	and not UnitCastingInfo("player")
	and IsUsableSpell(115072) then	
		--VAS_WriteToChat("\124cFFFF55FF ExpelHarm")
		VAS_Cast(115072,nil)
		return true 
	end

	--SurgingMistMM
	if not Vasa_DPSCheck
	then
		return true
	end

	if VAS_SpellAvailable(116694) 
	and IsUsableSpell(116694) 
	and not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	and select(5, Vasa_UnitInfo("player")) >= 1
	and UnitAffectingCombat("player") then
		if UnitBuffID("player",118674) 
		and not UnitCastingInfo("player") then --Vital Mists
			if IsSpellInRange(GetSpellInfo(116694),members[1].Unit) == 1
			then					
				if select(4, UnitBuffID("player",118674)) == 5 then		
					--VAS_WriteToChat("\124cFFFF55FFInstant Surging Mist - HP: " ..members[1].HP)
					--VAS_CustomTarget = members[1].Unit
					VAS_Cast(116694,members[1].Unit)
					return true
				end
			else	
				if select(4, UnitBuffID("player",118674)) == 5 then	
					--VAS_CustomTarget = "player"
					VAS_Cast(116694,"player")
					--VAS_WriteToChat("\124cFFFF55FFInstant Surging Mist - HP: " ..members[1].HP)
					return true				
				end
			end
		end
	end

	--RenewingMistMM
	if VAS_SpellAvailable(115151) 
	and IsUsableSpell(115151)
	and not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	and select(5, Vasa_UnitInfo("player")) >= 1
	and UnitAffectingCombat("player") then 										
		if IsSpellInRange(GetSpellInfo(115151),members[1].Unit) 
		and not UnitCastingInfo("player") then			
			VAS_Cast(115151,members[1].Unit)
			--VAS_WriteToChat("\124cFFFF55FFRenew member - HP: "..members[1].HP)
			return true
		elseif not UnitCastingInfo("player") then
			VAS_Cast(115151,nil)
			--VAS_WriteToChat("\124cFFFF55FFRenew Player")
			return true		
		end											
	end

	--TPnBoK
	if UnitAffectingCombat("player")
	and not stopdps
	and not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	and UnitExists("target")
	and not VAS_IsOutOfSight("target")
	and not UnitIsDeadOrGhost("target")
	and select(5, Vasa_UnitInfo("player")) >= 2
	and UnitCanAttack("player", "target") then
			if not UnitBuffID("player",127722) then --Serpent's Zeal		
				if VAS_SpellAvailable(100784)
				and IsUsableSpell(100784)
				and not UnitCastingInfo("player") 
				and IsSpellInRange(GetSpellInfo(100784),"target") == 1	then 		
					VAS_Cast(100784,"target")
					return true				
				end			
			else
				if ((select(7, UnitBuffID("player", 127722)) - GetTime()) <= 2) --Serpent's Zeal Timer
				and not UnitCastingInfo("player") 			
				and VAS_SpellAvailable(100784)
				and IsUsableSpell(100784)
				and IsSpellInRange(GetSpellInfo(100784),"target") == 1	then 
					VAS_Cast(100784,"target")
					--VAS_WriteToChat("\124cFFFF55FF BlackoutKick")
					return true							
				elseif VAS_SpellAvailable(100787) 
				and IsUsableSpell(100787)
				and IsSpellInRange(GetSpellInfo(100787),"target") == 1
				and not UnitCastingInfo("player") then
					--VAS_WriteToChat("\124cFFFF55FF TigerPalm for Muscle Memory")	
					VAS_Cast(100787,"target")
					return true 									
				end
			end
		
	end

	--TigerPalm
	if UnitAffectingCombat("player")
	and not stopdps
	and not UnitBuffID("player",101546) --Spinning Crane Kick
	and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
	and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
	and UnitExists("target") 
	and VAS_SpellAvailable(100787) 
	and IsUsableSpell(100787)
	and not VAS_IsOutOfSight("target")
	and not UnitIsDeadOrGhost("target")
	and IsSpellInRange(GetSpellInfo(100787),"target") == 1	
	and UnitCanAttack("player", "target") then
		if not UnitCastingInfo("player") 
		and select(5, Vasa_UnitInfo("player")) < 2 then
			--VAS_WriteToChat("\124cFFFF55FF TigerPalm for Muscle Memory")	
			VAS_Cast(100787,"target")
			return true 		
		end				
	end

	--CracklingJadeLightning - Lightning Weaver
	if Vasa_LightningWeaverCheck and LightningWeaverMode then
		if UnitAffectingCombat("player")
		and not stopdps
		and (select(5, Vasa_UnitInfo("player")) < 1		
		or (UnitBuffID("player",137331) --Meta gem Lucidity
		and not UnitBuffID("player",139597))) --Muscle Memory - 139598
		and not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		and VAS_SpellAvailable(117952) 
		and IsUsableSpell(117952) 
		and UnitExists("target") 
		and not VAS_IsOutOfSight("target")
		and not UnitIsDeadOrGhost("target")
		and not Vasa_Moving
		and IsSpellInRange(GetSpellInfo(117952),"target") == 1
		and not UnitCastingInfo("player")
		and UnitCanAttack("player", "target") then
			VAS_Cast(117952,"target")
			return true 
		end
	end

	--Jab
	if not Vasa_LightningWeaverCheck or not LightningWeaverMode then
		if UnitAffectingCombat("player")
		and not stopdps
		and (select(5, Vasa_UnitInfo("player")) < 1		
		or (UnitBuffID("player",137331) --Meta gem Lucidity
		and not UnitBuffID("player",139597))) --Muscle Memory - 139598
		and not UnitBuffID("player",101546) --Spinning Crane Kick
		and not (UnitChannelInfo("player") == GetSpellInfo(131523)) --Zen Meditation
		and not (UnitChannelInfo("player") == GetSpellInfo(117952)) --Crackling Jade Lightning
		and UnitExists("target") 
		and VAS_SpellAvailable(100780) 
		and IsUsableSpell(100780)
		and not VAS_IsOutOfSight("target")
		and not UnitIsDeadOrGhost("target")
		and IsSpellInRange(GetSpellInfo(100780),"target") == 1
		and not UnitCastingInfo("player")
		and UnitCanAttack("player", "target") then		
			--VAS_WriteToChat("\124cFFFF55FF Jab")
			VAS_Cast(100780,"target")
			return true 
		end
	end

	--AutoTarget
	if Vasa_AutoTargetCheck then	
		if (not UnitExists("focus")
			or UnitIsDeadOrGhost("focus")
			or not UnitInRange("focus") 
			or not UnitIsConnected("focus")
			or not UnitCanCooperate("player","focus"))
		and (UnitIsDeadOrGhost("target") 
			or not UnitExists("target"))	
		and PQI_VachiusaGeneral_RotationEngine_value ~= 4 and PQI_VachiusaGeneral_RotationEngine_value ~= 7 and PQI_VachiusaGeneral_RotationEngine_value ~= 8
		and #Vasa_Tanks > 0 then
			for i=1, #Vasa_Tanks do
				if UnitThreatSituation(Vasa_Tanks[i].Unit) == 3			
				and UnitAffectingCombat("player")		 
				then	
					VAS_AutoFocus(Vasa_Tanks[i].Unit)
					--VAS_TargetUnit(Vasa_Tanks[i].Unit)            		
					--VAS_RunMacroText("/focus")			
					--VAS_RunMacroText("/targetlasttarget")			
				end
			end
		end
		
		if UnitExists("focus")
		and not Vasa_Moving
		and (UnitIsDeadOrGhost("target") or not UnitExists("target"))
		and not UnitIsDeadOrGhost("focustarget")
		and not UnitIsDeadOrGhost("focus")
		and UnitExists("focustarget")
		and UnitCanAttack("player", "focustarget")
		and IsSpellInRange(GetSpellInfo(100780),"focustarget") == 1
		and not VAS_IsOutOfSight("focustarget")
		and UnitAffectingCombat("player") then
			VAS_TargetUnit("focustarget")
			return false 	
		elseif UnitExists("target") 
		and not stopdps
		and not UnitIsDeadOrGhost("target")
		and not UnitCastingInfo("player")
		and UnitCanAttack("player", "target")
		and Vasa_CheckLastCast(00013, 2.0) --prevent spamming
		and not VAS_IsOutOfSight("target") then
			if IsSpellInRange(GetSpellInfo(6603),"target") == 1 then		
				VAS_AttackTarget()
				return false 			
			else
				VAS_StopAttack()
				return false 
			end
		end
	end

	if PQI_VachiusaGeneral_RotationEngine_value == 4 then
		raidfu = nil
		vicon = nil
		CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", VAS_UpdateIcon)
	elseif PQI_VachiusaGeneral_RotationEngine_value == 7 and not UnitCastingInfo("player") then
		raidfu = nil
		vicon = nil
		HealBot_OnEvent_VachiusaUpdate(vicon,raidfu)
	elseif PQI_VachiusaGeneral_RotationEngine_value == 8 and not UnitCastingInfo("player") then
		raidfu = nil
		vicon = nil
		ElvUF_OnEvent_VachiusaUpdate(vicon,raidfu)	
	end
	return true
end